import request from '@/utils/request';

export async function authDuty(data) {
  return request('/jmonkey/system/acl/auth/duty', {
    method: 'POST',
    data,
  });
}

export async function authDept(data) {
  return request('/jmonkey/system/acl/auth/dept', {
    method: 'POST',
    data,
  });
}

export async function authJob(data) {
  return request('/jmonkey/system/acl/auth/job', {
    method: 'POST',
    data,
  });
}

export async function authRole(data) {
  return request('/jmonkey/system/acl/auth/role', {
    method: 'POST',
    data,
  });
}

export async function authUser(data) {
  return request('/jmonkey/system/acl/auth/user', {
    method: 'POST',
    data,
  });
}

export async function listUserAcl(userId) {
  return request(`/jmonkey/system/acl/list/user/${userId}`, {
    method: 'GET',
  });
}

export async function listRoleAcl(roleId) {
  return request(`/jmonkey/system/acl/list/role/${roleId}`, {
    method: 'GET',
  });
}

export async function listDeptAcl(deptId) {
  return request(`/jmonkey/system/acl/list/dept/${deptId}`, {
    method: 'GET',
  });
}

export async function listDutyAcl(dutyId) {
  return request(`/jmonkey/system/acl/list/duty/${dutyId}`, {
    method: 'GET',
  });
}

export async function listJobAcl(jobId) {
  return request(`/jmonkey/system/acl/list/job/${jobId}`, {
    method: 'GET',
  });
}